﻿Public Class F_登录
    Public Sub New()
        ' 此调用是设计器所必需的。
        InitializeComponent()
        ' 在 InitializeComponent() 调用之后添加任何初始化。
        Me.Height = 243
    End Sub


    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        Me.Height = 320
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        登录()
    End Sub
    Private Sub 登录()
        Try
            设置网络连接()
            Dim S_用户名 As String = TextBox1.Text
            Dim S_密码 As String = TextBox2.Text
            Dim DT_This = DCM_Control.SQL_Get_DataTable("用户视图", "用户名='" & S_用户名 & "'", CN_Test)
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub
    Private Sub 设置网络连接()
        Dim ServerIP = ""
        Select Case True
            'Case RadioButton1.Checked
            '    DCM_Control.ServerIP_Style = DCM.Enum_ServerIPStyle.IP_内网
            Case RadioButton2.Checked
                DCM_Control.ServerIP_Style = DCM.Enum_ServerIPStyle.IP_外网
                'Case RB_外网局域网.Checked
                '    DCM_Control.ServerIP_Style = DCM.Enum_ServerIPStyle.IP_外网局域网
            Case RadioButton1.Checked
                DCM_Control.ServerIP_Style = DCM.Enum_ServerIPStyle.IP_本机
                'Case RB_集团内部网.Checked
                '    DCM_Control.ServerIP_Style = DCM.Enum_ServerIPStyle.IP_集团内部网
            Case RadioButton3.Checked
                DCM_Control.ServerIP_Style = DCM.Enum_ServerIPStyle.IP_自定义
        End Select
        ServerIP = DCM.Get_DCMHL_ServerIP(DCM_Control.ServerIP_Style, TextBox3.Text)
        DCM_Control.CaoZuoRen_BuMen = CaoZuoRen_BuMen
        DCM_Control.CaoZuoRen = CaoZuoRen
        DCM_Control.CaoZuoRen_ID = CaoZuoRen_ID
        DCM_Control.ServerIP = ServerIP
        DCM_Control.ServerPort = DCM.ServerPort
        DCM_Control.AppVersionNumber = New DCM.Stru_Version(版本号)
        DCM_Control.CaoZuoRen_MAC = CaoZuoRen_Mac
    End Sub

    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
        DCM.Get_FileInfoFromFolder(Application.StartupPath)
    End Sub
End Class